Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

Managing Object Nodes

The QuickTime VR Manager provides functions that you can use to manage object nodes.

QTVRGetCurrentMouseMode

You can use the QTVRGetCurrentMouseMode function to obtain the current mouse control modes.

The value returned by the QTVRGetCurrentMouseMode function is an unsigned long integer that encodes the current mouse control modes. If a bit in the integer is set, the corresponding mode is one of the current mouse modes. The mode bits are addressed using these constants:

enum {
    kQTVRPanning                                    = 1L << 0,
    kQTVRTranslating                                = 1L << 1,
    kQTVRZooming                                    = 1L << 2,
    kQTVRScrolling                                  = 1L << 3,
    kQTVRSelecting                                  = 1L << 4
};

Notice that several modes can be returned. That means a return value could have both zooming and translating set, for example.

Constant descriptions

kQTVRPanning
If this bit is set, the mouse controls panning of standard objects, using objects-only controllers.
kQTVRTranslating
If this bit is set, the mouse controls translation for all objects.
kQTVRZooming
If this bit is set, the mouse controls zooming for all objects.
kQTVRScrolling
If this bit is set, the mouse controls arrow scrolling for standard objects and scrolling for joystick objects.
kQTVRSelecting
If this bit is set, the mouse controls selecting of objects as an object absolute controller.

QTVRGetFrameRate

You can use the QTVRGetFrameRate function to get the current frame rate of an object node.

float QTVRGetFrameRate (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
A floating-point value that represents the current frame rate of the specified movie.

DESCRIPTION

The QTVRGetFrameRate function returns, as its function result, the current frame rate of the object node specified by the qtvr parameter. A frame rate is a floating-point value in the range from -100.0 to +100.0. An object node's default frame rate is stored in the movie file.

SPECIAL CONSIDERATIONS

QTVRGetFrameRate is valid only for object nodes.

SEE ALSO

Use QTVRSetFrameRate (next) to set the frame rate of an object node.

QTVRSetFrameRate

You can use the QTVRSetFrameRate function to set the frame rate of an object node.

OSErr QTVRSetFrameRate (QTVRInstance qtvr, float rate);
qtvr
An instance of a QuickTime VR movie.
rate
The desired frame rate of the specified movie. A frame rate is a floating-point value in the range from -100.0 to +100.0. Positive values indicate forward rates, and negative values indicate reverse rates. Set this parameter to 0 to stop the movie.
function result
A result code.

DESCRIPTION

The QTVRSetFrameRate function sets the frame rate of the object node specified by the qtvr parameter to the rate specified by the rate parameter. This function is most useful when an object is being viewed with a looping animation. (The current view of the object may contain frames that are played in a loop, as specified by the file format.) You can use QTVRSetFrameRate to change the frame rate of the loop.

If the value specified in the rate parameter lies outside the valid range, QTVRSetFrameRate returns the result code constraintReachedErr and sets the frame rate to the nearest constraint.

SPECIAL CONSIDERATIONS

QTVRSetFrameRate is valid only for object nodes.

SEE ALSO

Use QTVRGetFrameRate to get the frame rate of an object node.

QTVRGetViewRate

You can use the QTVRGetViewRate function to get the current view rate of an object node.

float QTVRGetViewRate (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
A floating-point value that represents the current view rate of the specified movie.

DESCRIPTION

The QTVRGetViewRate function returns, as its function result, the current view rate of the object node specified by the qtvr parameter. A view rate is a floating-point value in the range from -100.0 to +100.0. An object node's default view rate is stored in the movie file.

SPECIAL CONSIDERATIONS

QTVRGetViewRate is valid only for object nodes.

SEE ALSO

Use QTVRSetViewRate (next) to set the view rate of an object node.

QTVRSetViewRate

You can use the QTVRSetViewRate function to set the view rate of an object node.

OSErr QTVRSetViewRate (QTVRInstance qtvr, float rate);
qtvr
An instance of a QuickTime VR movie.
rate
The desired view rate of the specified movie. A view rate is a floating-point value in the range from -100.0 to +100.0. Positive values indicate forward rates, and negative values indicate reverse rates. Set this parameter to 0 to stop the movie.
function result
A result code.

DESCRIPTION

The QTVRSetViewRate function sets the view rate of the object node specified by the qtvr parameter to the rate specified by the rate parameter. A node's view rate might be modified by the current animation settings.

If the value specified in the rate parameter lies outside the valid range, QTVRSetViewRate returns the result code constraintReachedErr and sets the view rate to the nearest constraint.

SPECIAL CONSIDERATIONS

QTVRSetViewRate is valid only for object nodes.

SEE ALSO

Use QTVRGetViewRate to get the current view rate of an object node.

QTVRGetCurrentViewDuration

You can use the QTVRGetCurrentViewDuration function to get the duration of the current view of an object node.

TimeValue QTVRGetCurrentViewDuration (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
The interval of time from the beginning to the end of the current view.

DESCRIPTION

The QTVRGetCurrentViewDuration function returns, as its function result, the duration of the current view of the object node specified by the qtvr parameter.

SPECIAL CONSIDERATIONS

QTVRGetCurrentViewDuration is valid only for object nodes.

You cannot change a node's view duration.

QTVRGetViewCurrentTime

You can use the QTVRGetViewCurrentTime function to get the current time in the current view.

TimeValue QTVRGetViewCurrentTime (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
The current time in the current view.

DESCRIPTION

The QTVRGetViewCurrentTime function returns, as its function result, the current time in the current view of the object node specified by the qtvr parameter. The returned value is always greater than or equal to 0 and less than or equal to the value returned by the QTVRGetCurrentViewDuration function.

SPECIAL CONSIDERATIONS

QTVRGetViewCurrentTime is valid only for object nodes.

SEE ALSO

Use QTVRSetViewCurrentTime (next) to set the current time of an object node.

QTVRSetViewCurrentTime

You can use the QTVRSetViewCurrentTime function to set the time in the current view.

OSErr QTVRSetViewCurrentTime (QTVRInstance qtvr, TimeValue time);
qtvr
An instance of a QuickTime VR movie.
time
The desired time in the current view.
function result
A result code.

DESCRIPTION

The QTVRSetViewCurrentTime function sets the current time in the current view of the object node specified by the qtvr parameter to the value specified by the time parameter. That value should be greater than or equal to 0 and less than or equal to the value returned by the QTVRGetCurrentViewDuration function.

QTVRSetViewCurrentTime returns the result code timeNotInViewErr if the specified time value is greater than or equal to the view duration of the specified object node; in addition, QTVRSetViewCurrentTime sets the current view time to 1 less than the view duration. Similarly, QTVRSetViewCurrentTime returns the result code timeNotInViewErr if the specified time value is less than 0; in that case, QTVRSetViewCurrentTime sets the current view time to 0.

SPECIAL CONSIDERATIONS

QTVRSetViewCurrentTime is valid only for object nodes.

SEE ALSO

Use QTVRGetViewCurrentTime to get the current time of an object node.

QTVRGetViewStateCount

You can use the QTVRGetViewStateCount function to get the number of view states of an object node.

UInt16 QTVRGetViewStateCount (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
The number of view states associated with the specified object node.

DESCRIPTION

The QTVRGetViewStateCount function returns, as its function result, the number of view states associated with the object node specified by the qtvr parameter. The number of view states in an object movie is defined by the movie file.

SPECIAL CONSIDERATIONS

QTVRGetViewStateCount is valid only for object nodes.

QTVRGetViewState

You can use the QTVRGetViewState function to get the value of a view state.

OSErr QTVRGetViewState (
                     QTVRInstance qtvr,
                     QTVRViewStateType viewStateType,
                     UInt16 *state);
qtvr
An instance of a QuickTime VR movie.
viewStateType
A view state type. See "View State Types" for a description of the available view state types.
state
On entry, a pointer to a short integer. On exit, that integer is set to the current value of the specified type of view state.
function result
A result code.

DESCRIPTION

The QTVRGetViewState function returns, in the state parameter, the current value of the view state of the object node specified by the qtvr parameter that has the type specified by the viewStateType parameter.

SPECIAL CONSIDERATIONS

QTVRGetViewState is valid only for object nodes.

SEE ALSO

Use QTVRSetViewState (next) to set the value of a view state.

QTVRSetViewState

You can use the QTVRSetViewState function to set the value of a view state.

OSErr QTVRSetViewState (
                     QTVRInstance qtvr,
                     QTVRViewStateType viewStateType,
                     UInt16 state);
qtvr
An instance of a QuickTime VR movie.
viewStateType
A view state type. See "View State Types" for a description of the available view state types.
state
The desired value of the specified type of view state.
function result
A result code.

DESCRIPTION

The QTVRSetViewState function sets the value of the view state of the object node specified by the qtvr parameter that has the type specified by the viewStateType parameter to the value specified by the state parameter.

SPECIAL CONSIDERATIONS

QTVRSetViewState is valid only for object nodes.

SEE ALSO

Use QTVRGetViewState to get the value of a view state.

QTVRGetAnimationSetting

You can use the QTVRGetAnimationSetting function to get the current state of an animation setting for an object node.

OSErr QTVRGetAnimationSetting (
                     QTVRInstance qtvr,
                     QTVRObjectAnimationSetting setting,
                     Boolean *enable);
qtvr
An instance of a QuickTime VR movie.
setting
An animation setting. See "Animation Settings" for a description of the available animation settings.
enable
On entry, a pointer to a Boolean value. On exit, that value is set to true if the specified animation setting is currently enabled for the specified object node or to false otherwise.
function result
A result code.

DESCRIPTION

The QTVRGetAnimationSetting function returns, through the enable parameter, the current state of the animation setting specified by the setting parameter for the object node specified by the qtvr parameter. If enable is true , the specified setting is currently enabled; otherwise, that setting is disabled.

SPECIAL CONSIDERATIONS

QTVRGetAnimationSetting is valid only for object nodes.

SEE ALSO

Use QTVRSetAnimationSetting (next) to set the state of an animation setting for an object node.

QTVRSetAnimationSetting

You can use the QTVRSetAnimationSetting function to set the state of an animation setting for an object node.

OSErr QTVRSetAnimationSetting (
                     QTVRInstance qtvr,
                     QTVRObjectAnimationSetting setting,
                     Boolean enable);
qtvr
An instance of a QuickTime VR movie.
setting
An animation setting. See "Animation Settings" for a description of the available animation settings.
enable
A Boolean value that indicates whether the specified animation setting is to be enabled for the specified object node ( true ) or disabled ( false ).
function result
A result code.

DESCRIPTION

The QTVRSetAnimationSetting function sets the state of the animation setting specified by the setting parameter for the object node specified by the qtvr parameter to the state specified by the enable parameter.

SPECIAL CONSIDERATIONS

QTVRSetAnimationSetting is valid only for object nodes.

SEE ALSO

Use QTVRGetAnimationSetting to get the current state of an animation setting for an object node.

QTVRGetControlSetting

You can use the QTVRGetControlSetting function to get the current state of a control setting for an object node.

OSErr QTVRGetControlSetting (
                     QTVRInstance qtvr,
                     QTVRControlSetting setting,
                     Boolean *enable);
qtvr
An instance of a QuickTime VR movie.
setting
A control setting. See "Control Settings" for a description of the available control settings.
enable
On entry, a pointer to a Boolean value. On exit, that value is set to true if the specified control setting is currently enabled for the specified object node or to false otherwise.
function result
A result code.

DESCRIPTION

The QTVRGetControlSetting function returns, through the enable parameter, the current state of the control setting specified by the setting parameter for the object node specified by the qtvr parameter. If enable is true , the specified setting is currently enabled; otherwise, that setting is disabled.

SPECIAL CONSIDERATIONS

QTVRGetControlSetting is valid only for object nodes.

SEE ALSO

Use QTVRSetControlSetting (next) to set the state of a control setting for an object node.

QTVRSetControlSetting

You can use the QTVRSetControlSetting function to set the state of a control setting for an object node.

OSErr QTVRSetControlSetting (
                     QTVRInstance qtvr,
                     QTVRControlSetting setting,
                     Boolean enable);
qtvr
An instance of a QuickTime VR movie.
setting
A control setting. See "Control Settings" for a description of the available control settings.
enable
A Boolean value that indicates whether the specified control setting is to be enabled for the specified object node ( true ) or disabled ( false ).
function result
A result code.

DESCRIPTION

The QTVRSetControlSetting function sets the state of the control setting specified by the setting parameter for the object node specified by the qtvr parameter to the state specified by the enable parameter.

SPECIAL CONSIDERATIONS

QTVRSetControlSetting is valid only for object nodes.

SEE ALSO

Use QTVRGetControlSetting to get the current state of a control setting for an object node.

QTVRGetFrameAnimation

You can use the QTVRGetFrameAnimation function to get the current state of frame animation for an object node.

Boolean QTVRGetFrameAnimation (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
A Boolean value that indicates whether frame animation is enabled for the specified object node ( true ) or not ( false ).

DESCRIPTION

The QTVRGetFrameAnimation function returns, as its function result, a Boolean value that indicates the current state of frame animation for the object node specified by the qtvr parameter.

SPECIAL CONSIDERATIONS

QTVRGetFrameAnimation is valid only for object nodes.

SEE ALSO

Use QTVREnableFrameAnimation (next) to set the state of frame animation for an object node.

QTVREnableFrameAnimation

You can use the QTVREnableFrameAnimation function to enable or disable frame animation for an object node.

OSErr QTVREnableFrameAnimation (QTVRInstance qtvr, Boolean enable);
qtvr
An instance of a QuickTime VR movie.
enable
A Boolean value that indicates whether to enable ( true ) or disable ( false ) frame animation for the specified object node.
function result
A result code.

DESCRIPTION

The QTVREnableFrameAnimation function enables or disables the frame animation state for the object node specified by the qtvr parameter, according to the value of the enable parameter.

The current frame rate (as set by the function QTVRSetFrameRate ) is unaffected by the state of frame animation of an object node.

SPECIAL CONSIDERATIONS

QTVREnableFrameAnimation is valid only for object nodes.

You should use QTVREnableFrameAnimation instead of standard QuickTime functions to control object animation.

SEE ALSO

Use QTVRGetFrameAnimation to get the current state of frame animation for an object node.

QTVRGetViewAnimation

You can use the QTVRGetViewAnimation function to get the current state of view animation for an object node.

Boolean QTVRGetViewAnimation (QTVRInstance qtvr);
qtvr
An instance of a QuickTime VR movie.
function result
A Boolean value that indicates whether view animation is enabled for the specified object node ( true ) or not ( false ).

DESCRIPTION

The QTVRGetViewAnimation function returns, as its function result, a Boolean value that indicates the current state of view animation for the object node specified by the qtvr parameter.

SPECIAL CONSIDERATIONS

QTVRGetViewAnimation is valid only for object nodes.

SEE ALSO

Use QTVREnableViewAnimation (next) to set the state of view animation for an object node.

QTVREnableViewAnimation

You can use the QTVREnableViewAnimation function to enable or disable view animation for an object node.

OSErr QTVREnableViewAnimation (QTVRInstance qtvr, Boolean enable);
qtvr
An instance of a QuickTime VR movie.
enable
A Boolean value that indicates whether to enable ( true ) or disable ( false ) view animation for the specified object node.
function result
A result code.

DESCRIPTION

The QTVREnableViewAnimation function enables or disables the view animation state for the object node specified by the qtvr parameter, according to the value of the enable parameter.

SPECIAL CONSIDERATIONS

QTVREnableViewAnimation is valid only for object nodes.

You should use QTVREnableViewAnimation instead of standard QuickTime functions to control object animation.

SEE ALSO

Use QTVRGetViewAnimation to get the current state of view animation for an object node.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |